package com.ruoyi.monitor.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.monitor.mapper.SysMessageMapper;
import com.ruoyi.monitor.domain.SysMessage;
import com.ruoyi.monitor.service.ISysMessageService;

/**
 * 短信预警Service业务层处理
 * 
 * @author xzx
 * @date 2023-02-16
 */
@Service
public class SysMessageServiceImpl extends ServiceImpl<SysMessageMapper, SysMessage> implements ISysMessageService
{
    @Autowired
    private SysMessageMapper sysMessageMapper;

    /**
     * 查询短信预警
     * 
     * @param id 短信预警主键
     * @return 短信预警
     */
    @Override
    public SysMessage selectSysMessageById(Integer id)
    {

        return sysMessageMapper.selectById(id);
    }

    /**
     * 查询短信预警列表
     * 
     * @param sysMessage 短信预警
     * @return 短信预警
     */
    @Override
    public List<SysMessage> selectSysMessageList(SysMessage sysMessage)
    {
        return sysMessageMapper.selectSysMessageList(sysMessage);
    }

    /**
     * 新增短信预警
     * 
     * @param sysMessage 短信预警
     * @return 结果
     */
    @Override
    public int insertSysMessage(SysMessage sysMessage)
    {
        return sysMessageMapper.insert(sysMessage);
    }

    /**
     * 修改短信预警
     * 
     * @param sysMessage 短信预警
     * @return 结果
     */
    @Override
    public int updateSysMessage(SysMessage sysMessage)
    {
        return sysMessageMapper.update(sysMessage,null);
    }

    /**
     * 批量删除短信预警
     * 
     * @param ids 需要删除的短信预警主键
     * @return 结果
     */
    @Override
    public int deleteSysMessageByIds(Integer[] ids)
    {
        return sysMessageMapper.deleteSysMessageByIds(ids);
    }

    /**
     * 删除短信预警信息
     * 
     * @param id 短信预警主键
     * @return 结果
     */
    @Override
    public int deleteSysMessageById(Integer id)
    {
        return sysMessageMapper.deleteSysMessageById(id);
    }
}
